<template>
  <view class="page_box">
    <view class="header">
      <u-navbar auto-back title="立即提现" title-style="color:#fff" left-icon-color="#fff" bgColor="background:rgba(0,0,0,0)"></u-navbar>
    </view>
    <view class="main">
      <view class="box">
        <view class="title">提现金额</view>
        <up-input v-model="amount" class="input_num" fontSize="30rpx" placeholder="" border="none" clearable>
          <template #prefix>
            <text class="unit">￥</text>
          </template>
          <template #suffix>
            <text class="all_text" @click="allClick">全部提现</text>
          </template>
        </up-input>
        <!-- <view class="des">
          当前余额：
          <text>￥{{ dqyeNum }}</text>
        </view> -->
      </view>

      <view class="box">
        <view class="title">提现方式</view>
        <view class="zfbbox">
          <view class="left">
            <u-icon name="zhifubao-circle-fill" color="#5c8bfd" size="30"></u-icon>
            <view class="textBox">
              <view>提现到支付宝</view>
              <view>实时到账</view>
            </view>
          </view>

          <view class="">
            <!-- <u-radio-group v-model="radiovalue1" activeColor="#02409a">
              <u-radio name="1"></u-radio>
            </u-radio-group> -->
            <u-icon name="checkmark-circle" color="#127FFE" size="20"></u-icon>
          </view>
        </view>
      </view>
    </view>

    <view class="bottomBox">
      <u-button type="primary" shape="circle" @click="submit">确认提现</u-button>
    </view>
  </view>
</template>

<script lang="ts" setup>
import { onBeforeMount, ref } from "vue";
const radiovalue1 = ref("1");
const amount = ref();
const dqyeNum = ref(0);
onBeforeMount(async () => {});
const allClick = () => {
  console.log(dqyeNum.value);
  amount.value = dqyeNum.value;
  if (dqyeNum.value === 0) {
    uni.showToast({
      title: "暂无余额",
      icon: "none",
    });
  }
};
const submit = async () => {
  console.log(amount.value);
};
</script>

<style lang="less" scoped>
.main {
  margin-top: -200rpx;
}
.box {
  background: #ffffff;
  border-radius: 32rpx;
  margin-bottom: 20rpx;
  padding: 32rpx 40rpx;
  .title {
    font-size: 32rpx;
    font-weight: 600;
    color: #333333;
    line-height: 44rpx;
  }
  .input_num {
    height: 150rpx;
  }
  .des {
    font-size: 28rpx;
    font-weight: 400;
    color: #bebebe;
    margin-top: 38rpx;
    text {
      color: #02409a;
    }
  }
  /deep/ .u-cell__body {
    padding-left: 0px;
    padding-right: 0px;
  }
}
.img {
  width: 64rpx;
  height: 64rpx;
  margin-right: 32rpx;
}
.zfbbox {
  display: flex;
  justify-content: space-between;
  margin: 30rpx 0;
  align-items: center;
  padding-bottom: 20rpx;
  border-bottom: 1px solid #f7f7f7;

  .left {
    display: flex;
    .img {
      width: 56rpx;
      height: 56rpx;
    }
    .iconBox {
      position: relative;
      margin-right: 14rpx;
      .img,
      .icon {
        width: 38rpx;
        height: 38rpx;
        position: absolute;
        left: 20rpx !important;
        top: 20rpx !important;
      }
      .icon {
        left: 0;
        top: 0;
      }
    }
    .textBox {
      font-size: 30rpx;
      color: #333333;
      margin-left: 30rpx;
      & > view {
        &:last-child {
          color: #a6a9af;
          font-size: 24rpx;
        }
      }
    }
  }
}
.unit {
  font-size: 48rpx;
  font-family: PingFangSC, PingFang SC;
  font-weight: 500;
  color: #333333;
  line-height: 66rpx;
}
.all_text {
  font-size: 28rpx;
  font-weight: 400;
  color: #127ffe !important;
}
.bottomBox {
  box-sizing: border-box;
  width: 100%;
  position: fixed;
  bottom: 0;
  left: 0;
  background-color: #fff;
  padding: 20rpx;
}
</style>
